package com.ormlite.activity.tool;

import java.util.List;

import android.util.Log;

import com.ormlite.pojo.Event;
import com.ormlite.pojo.Movie;

public class LogUtils {

	private LogUtils() {
		// no instance needed
	}

	public static void logMovieEntity(Movie movie) {
		Log.v("Movie no ", String.valueOf(movie.getId()));
		Log.v("title: ", movie.getTitle());
		Log.v("director: ", movie.getDirector());
		Log.v("year: ", movie.getYear().toString());
		Log.v("rate: ", (movie.getRate() == null) ? " " : movie.getRate().toString());
	}

	public static void logAllMovies(List<Movie> movies) {
		Log.v("List of all movies: ", "");
		for (Movie movie : movies) {
			logMovieEntity(movie);
		}
	}

	public static void logEventEntity(Event event) {
		Log.v("Event no ", String.valueOf(event.getId()));
		Log.v("movie title: ", event.getMovie().getTitle());
		Log.v("time: ", event.getTime().toString());
		Log.v("comment: ", event.getComment());
	}

	public static void logAllEvents(List<Event> events) {
		Log.v("List of all events: ", "");
		for (Event event : events) {
			logEventEntity(event);
		}
	}
}
